package com.nbicc.hot.listener;

import com.nbicc.hot.service.INewsVisitService;
import com.nbicc.parent.listener.OnVisitListener;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

/**
 * @Author: lilingyan
 */

/**
 * 新闻访问流量监听计数器
 */
@Component("NewsVisitListenerImpl")
public class NewsVisitListenerImpl implements OnVisitListener<Number>{

    @Resource(name = "NewsVisitServiceImpl")
    private INewsVisitService newsVisitService;

    @Override
    public void visit(Number newId) {
        newsVisitService.incrementVisit(newId);
    }

}
